

<template>
<!-- 上下等价 -->
<button @click="f"></button>
<button v-on:click="f"></button>
  <input type="text" placeholder="输入你想增加的功德量"  v-model="search"  @keydown.enter="sss">
</template>


<script setup>
import {ref} from "vue";

const f = ()=>{
  alert('功德+1');
};

const search = ref(1);

const sss=()=>{
  alert("功德+"+search.value+"次");
}



</script>

<style scoped>

</style>